﻿namespace WMS6.Web.Administration
{
    using System;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;
    using WMS6.Web;

    public class SysCodeQuery : BasePage
    {
        protected Button btnExport;
        protected Button btnList;
        protected Button btnNew;
        protected Button btnSearch;
        protected DropDownList ddlDescription;
        protected DropDownList ddlSysCodeOper;
        protected HtmlForm F1080;
        protected HtmlInputHidden hdnActionID;
        protected Label lblDescription;
        protected Label lblSys_Code;
        protected Label lblSysCode;
        protected HtmlLink mycss;
        protected TextBox txtDescription;
        protected TextBox txtSysCode;

        protected void btnSearch_Click(object sender, EventArgs e)
        {
            base.Server.Transfer("SysCodeList.aspx", false);
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                base.InitPage(this.Page);
                base.InitQueryDDL(this.ddlSysCodeOper, 0);
                base.InitQueryDDL(this.ddlDescription, 0);
            }
        }

        public string Description
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtDescription.Text.Trim()))
                {
                    return base.GetParamsString(this.txtDescription.Text.Trim(), this.ddlDescription.SelectedValue);
                }
                return "";
            }
        }

        public string SysCode
        {
            get
            {
                if (!string.IsNullOrEmpty(this.txtSysCode.Text.Trim()))
                {
                    return base.GetParamsString(this.txtSysCode.Text.Trim(), this.ddlSysCodeOper.SelectedValue);
                }
                return "";
            }
        }
    }
}

